
<?php

// scommenta aruba e commenta local

//echo get_include_path();
error_reporting(E_ALL|E_STRICT); 
//define('ZEND_ROOT', '/web/htdocs/www.whichclub.it/home/');


// Define path to application directory
defined('APPLICATION_PATH')
    || define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/application'));

// Define application environment
defined('APPLICATION_ENV')
    || define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));

// LOCAL
// Ensure library/ is on include_path
set_include_path(implode(PATH_SEPARATOR, array(
    realpath(APPLICATION_PATH . '/../library'),
    get_include_path(),APPLICATION_PATH
)));


// Ensure library/ is on include_path
// ARUBA
//set_include_path(get_include_path().PATH_SEPARATOR.'/web/htdocs/www.whichclub.it/home/library/');

// Ensure library/ is on include_path
// ARUBA
//set_include_path(get_include_path().PATH_SEPARATOR.'/web/htdocs/www.whichclub.it/home/application/');

/** Zend_Application */
require_once 'Zend/Application.php';

// Create application, bootstrap, and run
$application = new Zend_Application(
    APPLICATION_ENV,
    APPLICATION_PATH . '/configs/application.ini'
);

//echo APPLICATION_PATH;

/** Routing Info **/
/*
$FrontController = Zend_Controller_Front::getInstance();
$router = $FrontController->getRouter();

$route1 = new Zend_Controller_Router_Route(
            '/:name/:piva', array(   'controller' => 'Club',
                                     'action'   => 'show-club-info',
                                     'name'=>'italia2',
                                     'piva'=>'00123456789'
                                 )
         );

$route2  = new Zend_Controller_Router_Route(
            'Index/:action', array('controller'  => 'Index',
                      'action' => 'show-active-events') );

$route3  = new Zend_Controller_Router_Route(
            'Club/:action', array('controller'  => 'Club',
                                          'action' => 'index'));

$route4  = new Zend_Controller_Router_Route(
            'Contact/:action', array('controller'  => 'Contact',
                                          'action' => 'index'));

$route5  = new Zend_Controller_Router_Route(
            'NewsLetter/:action', array('controller'  => 'NewsLetter',
                                          'action' => 'index'));

$router->addRoute('locale', $route1);
$router->addRoute('index', $route2);
$router->addRoute('club', $route3);
$router->addRoute('contact', $route4);
$router->addRoute('newsletter', $route5);
*/

//var_dump($application);

//require_once ('Zend/Loader/Autoloader.php');
//$autoloader = Zend_Loader_Autoloader::getInstance();
//Zend_Session::start();


$application->bootstrap()
            ->run();